<template>
	<view style="padding:1% 3%;background-color: #ebebec;">
		<view v-for="(itema, indexa) in authTables" :key="indexa" class="everyCss">
			<uni-section :title="itema.title" type="line" titleFontSize="14">
				<uni-grid :column="4" :highlight="true" :showBorder="false" :square="false">
					<uni-grid-item v-for="(item, index) in authTables[indexa].sub" :index="index" :key="index"
						@click.native="goPage(item)" style="padding-bottom: 10%;">
						<view class="grid-item-box"
							style="background-color: #fff;text-align: center;vertical-align: center;">
							<img :src="item.icon" alt="" style="width:40px;height: 40px;;">
							<p class="text">{{item.name}}</p>
						</view>
					</uni-grid-item>
				</uni-grid>
			</uni-section>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				authTables: [{
						title: '项目管理',
						sub: [{
							name: '项目管理',
							icon: 'https://i.postimg.cc/hvV2xYwc/image.png',
							path: '/pages/subPack/projectManage/index',
						}]
					},
					{
						title: '投标管理',
						sub: [{
							name: '投标管理',
							icon: 'https://i.postimg.cc/mk4YxgXW/3.png',
							path: '',
						}]
					},
					{
						title: '进度管理',
						sub: [{
							name: '进度管理',
							icon: 'https://i.postimg.cc/288WnJgG/4.png',
							path: ''
						}]
					},
					{
						title: '绩效管理',
						sub: [{
							name: '绩效管理',
							icon: 'https://i.postimg.cc/pd852tnW/7.png',
							path: '',
						}, {
							name: '绩效记录',
							icon: 'https://i.postimg.cc/LXpY50zz/8.png',
							path: '',
						}]
					},
					{
						title: '技术管理',
						sub: [{
							name: '科研/标准',
							icon: 'https://i.postimg.cc/nrwh4dQS/13.png',
							path: ''
						}, {
							name: '培训管理',
							icon: 'https://i.postimg.cc/TPq272DD/14.png',
							path: ''
						}, {
							name: '测绘数据',
							icon: 'https://i.postimg.cc/8cs1zhnR/15.png',
							path: ''
						}]
					},
					{
						title: '日志管理',
						sub: [{
							name: '日报管理',
							icon: 'https://i.postimg.cc/K8mmKSVc/20.png',
							path: ''
						}, {
							name: '周报管理',
							icon: 'https://i.postimg.cc/5ywM0nSF/21.png',
							path: ''

						}, {
							name: '月报管理',
							icon: 'https://i.postimg.cc/3wd5pKZh/22.png',
							path: ''
						}, {
							name: '日志记录',
							icon: 'https://i.postimg.cc/brfKK1fY/23.png',
							path: '/pages/subPack/logRecord/logRecord'
						}]
					}
				],
			}
		},
		methods: {
			goPage(item) {
				console.log(item, '详情页')
				if (!item.path) return;
				uni.navigateTo({
					url: item.path
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.grid-text {
		font-size: 14px;
		color: #909399;
		padding: 10rpx 0 20rpx 0rpx;
		/* #ifndef APP-PLUS */
		box-sizing: border-box;
		/* #endif */
	}

	.everyCss {
		background-color: #ffffff;
		border-radius: 10px;
		padding: 1%;
		margin-top: 10px;
	}
</style>